import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login'
import expenseType from '@/views/expenseType'
import invoice from '@/views/invoice'
import baoxiaoStep2 from '@/views/baoxiaoStep2'
import baoxiaoStep3 from '@/views/baoxiaoStep3'
import sendK2 from '@/views/sendK2'
import selectCompany from '@/views/selectCompany'
import selectDep from '@/views/selectDep'
import k2PersonSelect from '@/views/k2PersonSelect'
import wxInvoiceList from '@/views/wxInvoiceList'
import xinCenStep1 from '@/views/xinCenStep1'
import xinCenStep2 from '@/views/xinCenStep2'
import xinCenStep3 from '@/views/xinCenStep3'
import xinCenPersonSelect from '@/views/xinCenPersonSelect'
import xinCenStep1PersonSelect from '@/views/xinCenStep1PersonSelect'
import cityList from '@/views/cityList'
import caiBaoStep1 from '@/views/caiBaoStep1'
import caiBaoStep2 from '@/views/caiBaoStep2'
import caiBaoStep3 from '@/views/caiBaoStep3'
import caiBaoFeeZuSu from '@/views/caiBaoFeeZuSu'
import caiBaoFeeJiaoTong from '@/views/caiBaoFeeJiaoTong'
// import caiBaoFeeJiaoTong from '@/views/caiBaoFeeJiaoTong1'
import caiBaoFeeQiTa from '@/views/caiBaoFeeQiTa'
import xinCenList from '@/views/xinCenList'
import jiekuanExpenseType from '@/views/jiekuanExpenseType'
import jiekuanStep1 from '@/views/jiekuanStep1'
import jiekuanSenQinList from '@/views/jiekuanSenQinList'
import jiekuanStep2 from '@/views/jiekuanStep2'
import jiekuanStep3 from '@/views/jiekuanStep3'
import huankuanStep1 from '@/views/huankuanStep1'
import huankuanStep2 from '@/views/huankuanStep2'
import huankuanStep3 from '@/views/huankuanStep3'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '/login',
      name: '授权登录',
      component: login,
      meta: {
        notRequireAuth: true
      }
    },
    {
      path: '/expenseType',
      name: '选择费用类型',
      component: expenseType
    },
    {
      path: '/invoice',
      name: '第一步 选择发票',
      component: invoice
    },
    {
      path: '/baoxiaoStep2',
      name: '第二步 填写报销金额',
      component: baoxiaoStep2
    },
    {
      path: '/baoxiaoStep3',
      name: '第三步 信息确认',
      component: baoxiaoStep3
    },
    {
      path: '/sendK2',
      name: '最后一步 发起K2',
      component: sendK2,
      children: [
        {
          path: '/sendK2/k2PersonSelect',
          name: '选择审批人',
          component: k2PersonSelect
        }
      ]
    },
    {
      path: '/selectCompany',
      name: '报销公司',
      component: selectCompany
    },
    {
      path: '/selectDep',
      name: '报销部门',
      component: selectDep
    },
    {
      path: '/wxInvoiceList',
      name: '导入发票',
      component: wxInvoiceList
    },
    {
      path: '/xinCenStep1',
      name: '第一步 新建行程',
      component: xinCenStep1,
      children: [
        {
          path: '/xinCenStep1/cityList',
          name: '选择城市',
          component: cityList
        },
        // {
        //   path: '/xinCenStep1/xinCenPersonSelect',
        //   name: '选择出差人',
        //   component: xinCenPersonSelect
        // },
        {
          path: '/xinCenStep1/xinCenStep1PersonSelect',
          name: '选择出差人',
          component: xinCenStep1PersonSelect
        }
      ]
    },
    {
      path: '/xinCenStep2',
      name: '第二步 填写出差类型/事由',
      component: xinCenStep2
    },
    {
      path: '/xinCenStep3',
      name: '第三步 确认行程信息',
      component: xinCenStep3,
      children: [
        {
          path: '/xinCenStep3/selectCompany',
          name: '所属公司',
          component: selectCompany
        },
        {
          path: '/xinCenStep3/selectDep',
          name: '所属部门',
          component: selectDep
        }
      ]
    },
    {
      path: '/caiBaoStep1',
      name: '第一步 选择报销行程',
      component: caiBaoStep1
    },
    {
      path: '/caiBaoStep2',
      name: '第二步 填写报销信息',
      component: caiBaoStep2,
      children: [
        {
          path: '/caiBaoStep2/caiBaoFeeJiaoTong',
          name: '填写交通费信息',
          component: caiBaoFeeJiaoTong
        },
        {
          path: '/caiBaoStep2/caiBaoFeeZuSu',
          name: '填写住宿费发票信息',
          component: caiBaoFeeZuSu,
          children: [
            {
              path: '/caiBaoStep2/caiBaoFeeZuSu/invoice',
              name: '选择发票',
              component: invoice
            }
          ]
        },
        {
          path: '/caiBaoStep2/caiBaoFeeQiTa',
          name: '填写其他费用信息',
          component: caiBaoFeeQiTa
        }
      ]
    },
    {
      path: '/caiBaoStep3',
      name: '第三步  确认报销说明和收款信息',
      component: caiBaoStep3,
      children: [
        {
          path: '/caiBaoStep3/xinCenPersonSelect',
          name: '添加收款人',
          component: xinCenPersonSelect
        }
      ]
    },
    {
      path: '/xinCenList',
      name: '全部行程',
      component: xinCenList
    },
    {
      path: '/jiekuanExpenseType',
      name: '选择借款用途',
      component: jiekuanExpenseType
    },
    {
      path: '/jiekuanStep1',
      name: '第一步 选择借款类型',
      component: jiekuanStep1
    },
    {
      path: '/jiekuanSenQinList',
      name: '选择申请单',
      component: jiekuanSenQinList
    },
    {
      path: '/jiekuanStep2',
      name: '第二步 填写借款单',
      component: jiekuanStep2
    },
    {
      path: '/jiekuanStep3',
      name: '第三步 确认借款信息',
      component: jiekuanStep3
    },
    {
      path: '/huankuanStep1',
      name: '第一步 选择借款单',
      component: huankuanStep1
    },
    {
      path: '/huankuanStep2',
      name: '第二步 填写还款金额及说明',
      component: huankuanStep2
    },
    {
      path: '/huankuanStep3',
      name: '第三步 确认还款信息',
      component: huankuanStep3
    }
  ]
})
